<?php
ob_start();

$image = $_POST['image'];
$nombre = $_POST['nombre'];
$jornada = $_POST['jornada'];

$carpeta = "ImagenesJornada1";

$decoded = base64_decode(str_replace('data:image/png;base64,', '', $image));

   // echo "<img src='" . $image ."' alt='image' />";  
   if ($jornada == "1") {
     	$carpeta = "ImagenesJornada1";
     }else{
     	$carpeta = "ImagenesJornada2";
     }
file_put_contents($carpeta . "/" . $nombre, $decoded);	

?>